﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SMTC.Model.Domain
{
    public class PlanVersionDomain
    {
        public string PlanVersion
        {
            set
            {
                string[] version = value.Split('-');
                if (version != null && version.Length >= 3)
                {
                    this.VersionIndex = version[1];
                    this.VersionMonth = version[0];
                    for (int index = 2; index < version.Length; index++)
                    {
                        if (index > 2)
                        {
                            this.VersionRemark += ("-" + version[index]);
                        }
                        else
                        {
                            this.VersionRemark += version[index];
                        }
                    }
                }
            }
            get
            {
                return this.VersionMonth + "-" + this.VersionIndex + "-" + this.VersionRemark;
            }
        }

        public string VersionMonth { set; get; }

        public string VersionIndex { set; get; }

        public string VersionRemark { set; get; }
    }
}
